package com.job.blossom.work0707;

import java.util.Arrays;

/**
 * @author ZJM
 * @version 1.0
 * @since 2022-07-08 11:07:28
 */
public class MyHelper {


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSpecialty() {
        return specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    String name ;
    int age;
    String specialty;


    public void showSelf(){
        System.out.println("我的名字叫："+name+"\t我今年："+age+"\t我的专业是："+specialty);
    }
    public void find(){
        int[] array1 = {2,9,4,6,15,8,10} ;
        double a = 0;

        int sum = 0;
        Arrays.sort(array1);
//        System.out.println(array1);
        for (int i = 0; i <array1.length-1 ; i++) {
            sum = sum+i;
            a = sum/array1.length;
            double b = array1[3];

            if(a>b){
                System.out.println(a);
                break;

            }else{
                System.out.println(b);
                break;
            }
        }


        }

    }

